<?php


class Admin_oauthController extends Admin_baseController{
    
    public function __construct() {
        parent::__construct();
        $this->assign('menu_id', admin_nodeModel::USER);
    }


    public function countAction() {
        $oauth_id = Request::get('oauth_id');
        $page = Request::get('page', 1);
        $page_size = Request::get('page_size', 30);
        if(!$oauth_id) {
            Response::showMsg('数据传递有误,查看失败');
        }
        $total = self::model('user_oauth')->countByDay($oauth_id);
        $this->assign(array(
            'list' => self::model('user_oauth')->groupByDay($oauth_id, $page, $page_size),
            'pageHtml' => self::instance('Pagination')->page($page)->num($page_size)->total($total)->url('/admin_oauth/count?oauth_id='. $oauth_id . '&page=')->rendHtml()
        ));
        $this->display();
    }
}